home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Temático 40 Febrero 2004.iso / DOS / ntfs / user / makefile < prev    next >
Encoding:
Makefile  |  2001-02-11  |  3.5 KB  |  95 lines

  1. # Makefile for the NT filesystem user part
  2. #
  3. # Copyright (C) 1999 Christophe GRENIER
  4. # Copyright (C) 1997-99 RΘgis Duchesne
  5. #
  6. # Note : Do 'make clean_makespace' each time you modify this Makefile.
  7.  
  8. # Does anybody know how to include dependancies in a portable way?
  9.  
  10. # Files
  11. #  Programs to build
  12. PRG = ../ntdir ../ntcp ../ntchange ../ntdump ../ntcat ../ntgrep ../ntmkdir
  13. #  Programs
  14. CC      = gcc
  15. INSTALL = /bin/install -c
  16.  
  17. # Compilation flags
  18. #  To reach config.h
  19. CFLAGS  = -I..
  20. #  To reach the common stuff
  21. CFLAGS += -I../common -I../user -I../dos
  22. #  Warnings
  23. CFLAGS += -Wall -Wstrict-prototypes
  24. #  Debug option
  25. #CFLAGS += -g
  26. CFLAGS += -s
  27. #  Flags from 'configure'
  28. CFLAGS += -O2 -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DHAVE_CONFIG_H -fomit-frame-pointer
  29. LFLAGS = -s
  30. all: force $(PRG)
  31.  
  32. # Note : Solaris 'make' doesn't support the $^ variable
  33. DEP_NTDIR = ntdir.o support.o ../common/util.o ../dos/readdisk.o ../dos/hdaccess.o nttools.o  ../common/dir.o ../common/inode.o ../common/super.o ../common/attr.o ../dos/fnctdsk.o
  34. ../ntdir: $(DEP_NTDIR)
  35.     $(CC) $(LFLAGS) -o $@ $(DEP_NTDIR)
  36.  
  37. DEP_NTDUMP = ntdump.o dump.o support.o ../common/util.o ../dos/readdisk.o ../dos/hdaccess.o nttools.o ../common/dir.o ../common/inode.o ../common/super.o ../common/attr.o ../dos/fnctdsk.o
  38. ../ntdump: $(DEP_NTDUMP)
  39.     $(CC) $(LFLAGS) -o $@ $(DEP_NTDUMP)
  40.  
  41. DEP_NTGREP = ntgrep.o dump.o support.o ../common/util.o ../dos/readdisk.o ../dos/hdaccess.o nttools.o ../common/dir.o ../common/inode.o ../common/super.o ../common/attr.o ../dos/fnctdsk.o
  42. ../ntgrep: $(DEP_NTGREP)
  43.     $(CC) $(LFLAGS) -o $@ $(DEP_NTGREP)
  44.  
  45. DEP_NTCAT = ntcat.o support.o ../common/util.o ../dos/readdisk.o ../dos/hdaccess.o nttools.o ../common/dir.o ../common/inode.o ../common/super.o ../common/attr.o ../dos/fnctdsk.o
  46. ../ntcat: $(DEP_NTCAT)
  47.     $(CC) $(LFLAGS) -o $@ $(DEP_NTCAT)
  48.  
  49. DEP_NTCHANGE = ntchange.o support.o ../common/util.o ../dos/readdisk.o ../dos/hdaccess.o nttools.o ../common/dir.o ../common/inode.o ../common/super.o ../common/attr.o ../dos/fnctdsk.o
  50. ../ntchange: $(DEP_NTCHANGE)
  51.     $(CC) $(LFLAGS) -o $@ $(DEP_NTCHANGE)
  52.  
  53. DEP_NTCP = ntcp.o support.o ../common/util.o ../dos/readdisk.o ../dos/hdaccess.o nttools.o ../common/dir.o ../common/inode.o ../common/super.o ../common/attr.o ../dos/fnctdsk.o
  54. ../ntcp: $(DEP_NTCP)
  55.     $(CC) $(LFLAGS) -o $@ $(DEP_NTCP)
  56.  
  57. DEP_NTMKDIR = ntmkdir.o support.o util.o nttools.o dir.o inode.o super.o attr.o ../dos/readdisk.o ../dos/hdaccess.o  ../dos/fnctdsk.o
  58. ../ntmkdir: $(DEP_NTMKDIR)
  59.     $(CC) $(LFLAGS) -o $@ $(DEP_NTMKDIR)
  60.  
  61. attr.o:    ../common/attr.c
  62.     $(CC) $(CFLAGS) -c $< -o $@
  63. dir.o:    ../common/dir.c
  64.     $(CC) $(CFLAGS) -c $< -o $@
  65. inode.o:    ../common/inode.c
  66.     $(CC) $(CFLAGS) -c $< -o $@
  67. super.o:    ../common/super.c
  68.     $(CC) $(CFLAGS) -c $< -o $@
  69. util.o:        ../common/util.c
  70.     $(CC) $(CFLAGS) -c $< -o $@
  71. readdisk.o: ../dos/readdisk.c
  72.     $(CC) $(CFLAGS) -c $< -o $@
  73.  
  74. # Put the tree in its scratch state
  75. clean: force clean_workspace clean_makespace
  76.  
  77. # Remove work files from the work space
  78. clean_workspace: force
  79.     @rm -f core *~; \
  80.     echo User workspace is now clean
  81.  
  82. # Remove files created by this Makefile
  83. clean_makespace: force
  84.     @rm -rf $(DDIR) *.o $(PRG); \
  85.     echo User makespace is now clean
  86.  
  87. # Install the binaries
  88. install: force all
  89.     $(INSTALL) -d /usr/local/bin; \
  90.     $(INSTALL) $(PRG) /usr/local/bin
  91.  
  92. # This target doesn't generate a 'force' file. A target 'foo' depending on
  93. # 'force' is therefore forced to be updated, even if a 'foo' file exists
  94. force:
  95.